-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add a blog post about improved error handling for oauth2 configuration without internet #2850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a blog post about improved error handling for oauth2 configuration without internet #2850
Conversation
|
Once home-assistant/core#154579 merges and I'm able to put up the migration PRs, I can update this to add links to example migration PRs. |
📝 WalkthroughWalkthroughA blog post documenting improved error handling for OAuth2 configuration entries: code should catch Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant ConfigFlow as Config Flow
participant ImplFetcher as async_get_config_entry_implementation
participant Integration as Integration Init
note over ImplFetcher: Attempt to fetch OAuth2 implementation
ConfigFlow->>ImplFetcher: await async_get_config_entry_implementation(...)
alt Implementation available
ImplFetcher-->>ConfigFlow: Implementation
ConfigFlow->>Integration: proceed with setup
Integration-->>ConfigFlow: success
else Implementation unavailable (no internet)
ImplFetcher--xConfigFlow: throws ImplementationUnavailableError
ConfigFlow->>ConfigFlow: catch ImplementationUnavailableError
ConfigFlow-->>ConfigFlow: raise ConfigEntryNotReady("retryable message")
note over ConfigFlow: Platform will schedule retry
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Cache: Disabled due to data retention organization setting Knowledge base: Disabled due to data retention organization setting 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
blog/2025-10-26-config-entry-aouth2-error-handling.md(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
*/**(html|markdown|md)
⚙️ CodeRabbit configuration file
*/**(html|markdown|md): - For instructional content in documentation, use a direct and authoritative tone. Avoid expressions of politeness such as 'may' or 'please', and ensure the goal of the instruction is fronted.
- Apply the Microsoft Style Guide to ensure documentation maintains clarity and conciseness.
- In step-by-step instructions, front the location phrase in the instructional sentence.
- In step-by-step instructions, front the 'goal' in the instructional sentence.
- In step-by-step instructions, if in doubt what to front, front the 'goal' before the location phrase in the instructional sentence.
- do not hyphenate terms like 'top-right' or 'bottom-left' with 'corner'
*/**(html|markdown|md): - Use bold to mark UI strings.
If "" are used to mark UI strings, replace them by bold.
Be brief in your replies and don't add fluff like "thank you for..." and "Please let me know if"
Use sentence-style capitalization also in headings.
do not comment on HTML used for icons
Avoid flagging inline HTML for embedding videos in future reviews for this repository.
Files:
blog/2025-10-26-config-entry-aouth2-error-handling.md
🪛 markdownlint-cli2 (0.18.1)
blog/2025-10-26-config-entry-aouth2-error-handling.md
22-22: Link text should be descriptive
(MD059, descriptive-link-text)
22-22: Link text should be descriptive
(MD059, descriptive-link-text)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Redirect rules - developers-home-assistant
- GitHub Check: Header rules - developers-home-assistant
- GitHub Check: Pages changed - developers-home-assistant
361a82f to
0f8d9ff
Compare
|
@coderabbitai generate docstrings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (1)
blog/2025-10-26-config-entry-oauth2-error-handling.md (1)
1-1: Filename appears to have been corrected.The past review flagged a filename typo ("aouth2" → "oauth2"). The current file_start shows the corrected name. If this hasn't been committed yet, ensure the file is renamed to
blog/2025-10-26-config-entry-oauth2-error-handling.md.
🧹 Nitpick comments (1)
blog/2025-10-26-config-entry-oauth2-error-handling.md (1)
11-11: Use more direct phrasing.Per documentation guidelines, use a direct, authoritative tone. Change "Here is an example of the migration," to a more directive phrasing.
-Here is an example of the migration, +To migrate the code, apply the following change:
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
blog/2025-10-26-config-entry-oauth2-error-handling.md(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
*/**(html|markdown|md)
⚙️ CodeRabbit configuration file
*/**(html|markdown|md): - For instructional content in documentation, use a direct and authoritative tone. Avoid expressions of politeness such as 'may' or 'please', and ensure the goal of the instruction is fronted.
- Apply the Microsoft Style Guide to ensure documentation maintains clarity and conciseness.
- In step-by-step instructions, front the location phrase in the instructional sentence.
- In step-by-step instructions, front the 'goal' in the instructional sentence.
- In step-by-step instructions, if in doubt what to front, front the 'goal' before the location phrase in the instructional sentence.
- do not hyphenate terms like 'top-right' or 'bottom-left' with 'corner'
*/**(html|markdown|md): - Use bold to mark UI strings.
If "" are used to mark UI strings, replace them by bold.
Be brief in your replies and don't add fluff like "thank you for..." and "Please let me know if"
Use sentence-style capitalization also in headings.
do not comment on HTML used for icons
Avoid flagging inline HTML for embedding videos in future reviews for this repository.
Files:
blog/2025-10-26-config-entry-oauth2-error-handling.md
✅ Actions performedInitiated docstring generation; will generate only if new commits exist. |
|
Caution Docstrings generation - FAILED No docstrings were generated. |
0f8d9ff to
7986458
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Proposed change
Add a blog post about improved error handling for oauth2 configuration without internet
Type of change
Checklist
Additional information
Summary by CodeRabbit